#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "dialog.h"
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),wndReq(NULL),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    this->ui->Message->setVisible(false);
    this->vecComputer.push_back(ui->Computer);
}

MainWindow::~MainWindow()
{
    if(ui){
        delete ui;
        ui=NULL;
    }
}

void MainWindow::OnComputerClick()
{
//    QMyLabel *wndReq=this->vecComputer.at(0);
    if(wndReq==NULL){
        wndReq=new Dialog(this);
        wndReq->move(this->x(),this->y());
        wndReq->exec();
        if(wndReq){
            delete wndReq;
            wndReq=NULL;
        }
    }
}
